﻿<UserControl
    x:Class="EString.Controls.CustomTreeNode"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:EString.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="ms-appx:///Symmetry/Resources/GlobalResources.xaml"></ResourceDictionary>
                <ResourceDictionary Source="ms-appx:///Symmetry/Resources/VisualTreeTheme.xaml"></ResourceDictionary>
                <ResourceDictionary Source="ms-appx:///Symmetry/Themes/Generic.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <DataTemplate x:Key="VisualTree_NodeTemplate" >
                <Grid>
                    <local:CustomTreeNode Margin="0,0,-80,6" />
                </Grid>
            </DataTemplate>

            <Style x:Key="ListBoxItemStyle1" TargetType="ListBoxItem">
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="TabNavigation" Value="Local"/>
                <Setter Property="Padding" Value="8,10"/>
                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ListBoxItem">
                            <Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="PointerOver"/>
                                        <VisualState x:Name="Disabled">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
                                                </ObjectAnimationUsingKeyFrames>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemDisabledForegroundThemeBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="SelectionStates">
                                        <VisualState x:Name="Unselected"/>
                                        <VisualState x:Name="Selected">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemSelectedForegroundThemeBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="SelectedUnfocused">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemSelectedForegroundThemeBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="SelectedDisabled">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemSelectedDisabledForegroundThemeBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="SelectedPointerOver">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemSelectedForegroundThemeBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="SelectedPressed">
                                            <Storyboard>
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemSelectedForegroundThemeBrush}"/>
                                                </ObjectAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused"/>
                                        <VisualState x:Name="Unfocused"/>
                                        <VisualState x:Name="PointerFocused"/>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Grid x:Name="InnerGrid" Background="Transparent">
                                    <Rectangle x:Name="PressedBackground" Fill="{StaticResource ListBoxItemPressedBackgroundThemeBrush}" Opacity="0"/>
                                    <ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                    <Rectangle x:Name="FocusVisualWhite" Opacity="0" StrokeDashOffset=".5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1"/>
                                    <Rectangle x:Name="FocusVisualBlack" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1"/>
                                </Grid>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>            
            
            
            <SolidColorBrush x:Key="TreeViewItemButtonBgColor" Color="#74666666"/>
            <Style x:Key="ToggleButtonStyle1" TargetType="ToggleButton">
                <Setter Property="Background" Value="#FF1F3B53"/>
                <Setter Property="Foreground" Value="#FF000000"/>
                <Setter Property="Padding" Value="3"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="BorderBrush">
                    <Setter.Value>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFA3AEB9" Offset="0"/>
                            <GradientStop Color="#FF8399A9" Offset="0.375"/>
                            <GradientStop Color="#FF718597" Offset="0.375"/>
                            <GradientStop Color="#FF617584" Offset="1"/>
                        </LinearGradientBrush>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ToggleButton">
                            <Grid>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualStateGroup.Transitions>
                                            <VisualTransition GeneratedDuration="0:0:0.4">
                                                <VisualTransition.GeneratedEasingFunction>
                                                    <CircleEase EasingMode="EaseOut"/>
                                                </VisualTransition.GeneratedEasingFunction>
                                            </VisualTransition>
                                        </VisualStateGroup.Transitions>
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                        		<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOver1" d:IsOptimized="True"/>
                                        	</Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                        		<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseDown" d:IsOptimized="True"/>
                                        	</Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Disabled"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="CheckStates">
                                        <VisualState x:Name="Checked1">
                                            <Storyboard>
                                                <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="checkedGrid" d:IsOptimized="True"/>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Unchecked"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused"/>
                                        <VisualState x:Name="Unfocused"/>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Rectangle x:Name="MouseOver1" StrokeThickness="1" Fill="{StaticResource TreeViewItemButtonBgColor}" Opacity="0"/>
                                <Rectangle x:Name="MouseDown" RadiusY="2" RadiusX="2" StrokeThickness="1" Opacity="0" Margin="1">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="-0.321,-0.464" StartPoint="0.821,0.929">
                                            <GradientStop Color="#8CFFFFFF" Offset="0"/>
                                            <GradientStop Color="Transparent" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Grid x:Name="grid" >
                                    <Path Data="M2.4644861,11.430942 C2.4644861,11.430942 9.7326565,5.124702 20.213871,11.171516 C14.134805,14.896041 8.2144222,15.070246 2.4644861,11.430942 z" Margin="1.258,6.5,1.285,0" Stretch="Uniform" StrokeThickness="0.5" UseLayoutRounding="False" RenderTransformOrigin="0.5,0.5" Stroke="#FF818181" Height="10.405" VerticalAlignment="Top" StrokeEndLineCap="Round" StrokeStartLineCap="Round" Fill="Gray">
                                        <Path.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="-1"/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform X="-7.2479245716294827E-08"/>
                                            </TransformGroup>
                                        </Path.RenderTransform>
                                    </Path>
                                    <Path Data="M9.8619232,19.635794 C6.7526116,18.081139 4.9381132,21.838184 7.1409197,23.52265 C9.3437262,25.207115 15.810749,22.095642 19.43877,14.839304" Margin="8.24,5.538,2.698,-1.478" Stretch="Uniform" StrokeThickness="0.5" UseLayoutRounding="False" Stroke="#FF818181" StrokeEndLineCap="Round" StrokeStartLineCap="Round" RenderTransformOrigin="0.5,0.5">
                                    	<Path.RenderTransform>
                                    		<CompositeTransform Rotation="-7.482"/>
                                    	</Path.RenderTransform>
                                    </Path>
                                    <Path Data="M8.3429794,4.1574225 C4.7487521,8.9678364 15.416358,11.83163 14.583686,4.9130564 C13.610313,4.1482162 11.379923,4.0682821 8.3429794,4.1574225 z" HorizontalAlignment="Left" Height="8.409" Margin="16.018,6.254,0,0" StrokeStartLineCap="Round" Stretch="Fill" StrokeEndLineCap="Round" Stroke="#FF2F2F2F" UseLayoutRounding="False" VerticalAlignment="Top" Width="12.237" StrokeThickness="0.5" Fill="#FF2F2F2F"/>
                                </Grid>
                                <Grid x:Name="checkedGrid" Opacity="0">
                                    <Ellipse Fill="{StaticResource EStringOrange}" Margin="0,0,-1,-1" Opacity="0.4" Height="3" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="3"/>
                                </Grid>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="EndCapButton" TargetType="Button">
                <Setter Property="Background" Value="#FF1F3B53"/>
                <Setter Property="Foreground" Value="#FF000000"/>
                <Setter Property="Padding" Value="3"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="BorderBrush">
                    <Setter.Value>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFA3AEB9" Offset="0"/>
                            <GradientStop Color="#FF8399A9" Offset="0.375"/>
                            <GradientStop Color="#FF718597" Offset="0.375"/>
                            <GradientStop Color="#FF617584" Offset="1"/>
                        </LinearGradientBrush>
                    </Setter.Value>
                </Setter>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Grid>
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="CommonStates">
                                        <VisualStateGroup.Transitions>
                                            <VisualTransition GeneratedDuration="0:0:0.3">
                                                <VisualTransition.GeneratedEasingFunction>
                                                    <CircleEase EasingMode="EaseOut"/>
                                                </VisualTransition.GeneratedEasingFunction>
                                            </VisualTransition>
                                            <VisualTransition GeneratedDuration="0:0:0.3" To="Pressed">
                                                <VisualTransition.GeneratedEasingFunction>
                                                    <ExponentialEase EasingMode="EaseIn"/>
                                                </VisualTransition.GeneratedEasingFunction>
                                            </VisualTransition>
                                        </VisualStateGroup.Transitions>
                                        <VisualState x:Name="Normal"/>
                                        <VisualState x:Name="MouseOver">
                                            <Storyboard>
                                        		<DoubleAnimation Duration="0" To="0.45" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Hover" d:IsOptimized="True"/>
                                        	</Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Pressed">
                                            <Storyboard>
                                        		<DoubleAnimation Duration="0" To="0.45" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseDown" d:IsOptimized="True"/>
                                        	</Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="Disabled"/>
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="FocusStates">
                                        <VisualState x:Name="Focused"/>
                                        <VisualState x:Name="Unfocused"/>
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                <Rectangle x:Name="Base" StrokeThickness="1" Fill="{StaticResource TreeViewItemButtonBgColor}"/>
                                <Rectangle x:Name="Hover" RadiusY="2" RadiusX="2" StrokeThickness="1" Opacity="0" Margin="1">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="2,-1.058" StartPoint="0.288,0.808">
                                            <GradientStop Color="#FF656565" Offset="0.036"/>
                                            <GradientStop Color="#FF4F4F4F" Offset="0.747"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <Rectangle x:Name="MouseDown" RadiusY="2" RadiusX="2" StrokeThickness="1" Opacity="0" Margin="1">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="-0.321,-0.464" StartPoint="0.821,0.929">
                                            <GradientStop Color="#8CFFFFFF" Offset="0"/>
                                            <GradientStop Color="Transparent" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <ControlTemplate x:Key="CtxMenuCloseButton" TargetType="Button">
                <Grid>
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="CommonStates">
                            <VisualState x:Name="Normal"/>
                            <VisualState x:Name="MouseOver">
                                <Storyboard>
                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOver1" d:IsOptimized="True"/>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="MouseDown">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Thickness>0,0,2,2</Thickness>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Pressed">
                                <Storyboard>
                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseDown" d:IsOptimized="True"/>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="MouseDown">
                                        <DiscreteObjectKeyFrame KeyTime="0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <Thickness>0,0,2,2</Thickness>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Disabled"/>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <Rectangle x:Name="MouseDown" Fill="#FF424343" Margin="0,0,2,1" Opacity="0"/>
                    <Rectangle x:Name="MouseOver1" Fill="#FF424343" Opacity="0" Margin="0,0,1,1"/>
                    <TextBlock TextWrapping="Wrap" Text="X" d:LayoutOverrides="Width, Height" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="9.333" Foreground="{StaticResource DisabledBackgroundBrush}"/>
                </Grid>
            </ControlTemplate>
            <Style x:Key="ToggleButtonStyle2" TargetType="ToggleButton">
            	<Setter Property="Background" Value="{StaticResource ToggleButtonBackgroundThemeBrush}"/>
            	<Setter Property="Foreground" Value="{StaticResource ToggleButtonForegroundThemeBrush}"/>
            	<Setter Property="BorderBrush" Value="{StaticResource ToggleButtonBorderThemeBrush}"/>
            	<Setter Property="BorderThickness" Value="{StaticResource ToggleButtonBorderThemeThickness}"/>
            	<Setter Property="Padding" Value="12,4,12,5"/>
            	<Setter Property="HorizontalAlignment" Value="Left"/>
            	<Setter Property="VerticalAlignment" Value="Center"/>
            	<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
            	<Setter Property="FontWeight" Value="SemiBold"/>
            	<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
            	<Setter Property="Template">
            		<Setter.Value>
            			<ControlTemplate TargetType="ToggleButton">
            				<Grid>
            					<VisualStateManager.VisualStateGroups>
            						<VisualStateGroup x:Name="CommonStates">
            							<VisualState x:Name="Normal"/>
            							<VisualState x:Name="PointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Pressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Disabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Checked">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="CheckedPointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPointerOverBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="CheckedPressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="CheckedDisabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedDisabledBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Indeterminate"/>
            							<VisualState x:Name="IndeterminatePointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="IndeterminatePressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="IndeterminateDisabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            						</VisualStateGroup>
            						<VisualStateGroup x:Name="FocusStates">
            							<VisualState x:Name="Focused">
            								<Storyboard>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Unfocused"/>
            							<VisualState x:Name="PointerFocused"/>
            						</VisualStateGroup>
            					</VisualStateManager.VisualStateGroups>
            					<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="3">
            						<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            					</Border>
            					<Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1"/>
            					<Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1"/>
            				</Grid>
            			</ControlTemplate>
            		</Setter.Value>
            	</Setter>
            </Style>
            <Style x:Key="ToggleButtonStyle3" TargetType="ToggleButton">
            	<Setter Property="Background" Value="{StaticResource ToggleButtonBackgroundThemeBrush}"/>
            	<Setter Property="Foreground" Value="{StaticResource ToggleButtonForegroundThemeBrush}"/>
            	<Setter Property="BorderBrush" Value="{StaticResource ToggleButtonBorderThemeBrush}"/>
            	<Setter Property="BorderThickness" Value="{StaticResource ToggleButtonBorderThemeThickness}"/>
            	<Setter Property="Padding" Value="12,4,12,5"/>
            	<Setter Property="HorizontalAlignment" Value="Left"/>
            	<Setter Property="VerticalAlignment" Value="Center"/>
            	<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
            	<Setter Property="FontWeight" Value="SemiBold"/>
            	<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
            	<Setter Property="Template">
            		<Setter.Value>
            			<ControlTemplate TargetType="ToggleButton">
            				<Grid>
            					<VisualStateManager.VisualStateGroups>
            						<VisualStateGroup x:Name="CommonStates">
            							<VisualState x:Name="Normal"/>
            							<VisualState x:Name="PointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Pressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Disabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Checked">
            								<Storyboard>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter" d:IsOptimized="True"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="CheckedPointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPointerOverBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="CheckedPressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="4" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="4" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="CheckedDisabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedDisabledBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Indeterminate"/>
            							<VisualState x:Name="IndeterminatePointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="IndeterminatePressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="IndeterminateDisabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            						</VisualStateGroup>
            						<VisualStateGroup x:Name="FocusStates">
            							<VisualState x:Name="Focused">
            								<Storyboard>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Unfocused"/>
            							<VisualState x:Name="PointerFocused"/>
            						</VisualStateGroup>
            					</VisualStateManager.VisualStateGroups>
            					<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="3">
            						<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            					</Border>
            					<ContentPresenter x:Name="ContentPresenter_Expanded" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="12,4,12,5" Content="-" Opacity="0" RenderTransformOrigin="0.5,0.5">
            						<ContentPresenter.RenderTransform>
            							<CompositeTransform/>
            						</ContentPresenter.RenderTransform>
            					</ContentPresenter>
            					<Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1"/>
            					<Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1"/>
            				</Grid>
            			</ControlTemplate>
            		</Setter.Value>
            	</Setter>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid x:ConnectionId='1' x:Name="RootGrid"  
          Background="#00000000" VerticalAlignment="Top"                                      
                                                                                           >
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="VisualStateGroup">
                <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0:0:0.1">
                        <VisualTransition.GeneratedEasingFunction>
                            <CircleEase EasingMode="EaseIn"/>
                        </VisualTransition.GeneratedEasingFunction>
                    </VisualTransition>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                    <Storyboard>
                        <DoubleAnimation Duration="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Hover" d:IsOptimized="True" To="1"/>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                    <Storyboard>
                        <DoubleAnimation Duration="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Hover" d:IsOptimized="True" To="1"/>
                        <DoubleAnimation Duration="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedRectangle" d:IsOptimized="True" To="1"/>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="MouseOver_Selected">
                	<Storyboard>
                		<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Hover" d:IsOptimized="True"/>
                		<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedRectangle" d:IsOptimized="True"/>
                	</Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Rectangle x:Name="Hover" Grid.ColumnSpan="3" Stroke="{x:Null}" Opacity="0" Margin="-6,-4">
            <Rectangle.Fill>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF141414" Offset="0"/>
                    <GradientStop Color="#FF181818" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle x:Name="SelectedRectangle" Grid.ColumnSpan="3" HorizontalAlignment="Left" Stroke="{x:Null}" Width="2.5" Fill="{StaticResource EStringOrange}" Margin="-3,0,0,0" Opacity="0"/>
        <TextBlock FontSize="16" Text="{Binding Name}" VerticalAlignment="Center" Margin="3,0,0,0" Foreground="{StaticResource GlobalForeground_Brush}" FontFamily="Century Gothic" Grid.Column="1"  />
        <StackPanel Orientation="Horizontal" d:LayoutOverrides="Width" VerticalAlignment="Center" Margin="-6,0,0,0" >
            <ToggleButton x:ConnectionId='8' IsChecked="{Binding IsExpanded, Mode=TwoWay}" x:Name="PART_expanderToggle" Opacity="{Binding ShowExpander}"                                                                                     Content="+"  FontFamily="Segoe UI Light" Style="{StaticResource ToggleButtonStyle3}" BorderBrush="{x:Null}" Height="40" />
            <Button x:ConnectionId='9' x:Name="btnMenu" Content="" Style="{StaticResource EndCapButton}"                       Padding="0" ClickMode="Press" Width="40" Height="40" Margin="10,0,0,0" Visibility="Collapsed"/>
            <ToggleButton x:ConnectionId='10'                            Style="{StaticResource ToggleButtonStyle1}" Padding="0" Margin="10,0,0,0" Width="40" Height="40"
                          >
                <ToolTipService.ToolTip>
                    <ToolTip Template="{StaticResource ToolTipTemplate}"  Content="Toggles the Visibility of the associated object." 
					/>
                </ToolTipService.ToolTip>
            </ToggleButton>
        </StackPanel>
        <Popup x:ConnectionId='2' x:Name="ThePopup" Margin="4,0,0,0" VerticalAlignment="Bottom" HorizontalAlignment="Left"                                     VerticalOffset="-1" >
            <Grid x:ConnectionId='5' x:Name="mainPopupGrid" Background="#B1393939"                                          >
                <StackPanel Margin="3" Orientation="Horizontal">
                    <ToggleButton x:ConnectionId='6' x:Name="btnHide" Content="Trans-parent"                       Width="60" Style="{StaticResource CtxMenuPopupToggle}" Height="60" Margin="8,9,9,9"/>
                    <ToggleButton x:ConnectionId='7' x:Name="btnToggleHitTest" Content="Hit Test" Width="60" Style="{StaticResource CtxMenuPopupToggle}" Margin="4,9,9,9"                                Height="60"/>
                </StackPanel>
            </Grid>
        </Popup>
        <Grid Grid.Column="2" Margin="7,0,0,0" VerticalAlignment="Center">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock FontFamily="Times New Roman" Text="{Binding XName}" Foreground="{StaticResource EStringOrange}" Style="{StaticResource TreeSubtitle_Style}" FontSize="13.333" />
            <TextBlock FontFamily="Times New Roman" Text="{Binding FullName}" Foreground="#FF949494" Style="{StaticResource TreeSubtitle_Style}" Grid.Row="1" FontSize="12" />

            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <ToggleButton x:Name="PART_Expander"  Content="&gt;" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Style="{StaticResource ToggleButtonStyle1}" BorderBrush="#FF2B2B2B" Foreground="#FF131313" Background="LightGray" Visibility="Collapsed"/>
                    <TextBlock x:Name="PART_Name" TextWrapping="Wrap" Text="{Binding Name}" Margin="4,0,0,0" Visibility="Collapsed"/>
                    <TextBlock x:Name="PART_type" TextWrapping="Wrap" Text="{Binding NodeDataType}" Margin="4,0,0,0"/>
                </StackPanel>                
            </StackPanel>
        </Grid>
        <Border Grid.Row="1" Grid.ColumnSpan="10">
            <ListBox x:ConnectionId='4'                                                Visibility="Collapsed"
                     x:Name="PART_ic" ItemsSource="{Binding Children}" 
                 ItemTemplate="{StaticResource VisualTree_NodeTemplate}"   Margin="0" Style="{StaticResource ListBoxStyle_Symbiant_Metro}" ItemContainerStyle="{StaticResource ListBoxItemStyle1}"/>
        </Border>
        <Button x:ConnectionId='3' x:Name="btnNodeSelect" Content="" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                BorderBrush="{x:Null}" BorderThickness="0"                               
                                                        Background="#00B83DFF" Grid.Column="1"
                Grid.ColumnSpan="6" Margin="0,-4" Style="{StaticResource InvisiButton}"                                          />
    </Grid>
</UserControl>

